package com.opengw.configuration.support;

public class Base64 {
	public byte[] decode(String val){
		try{
			sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
			return decoder.decodeBuffer(val);
		} catch (Exception e) {
		}
		return null;
	}
	
	public String encode(byte[] val){
		sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
		return encoder.encode(val);
	}
}
